﻿@{
    ViewBag.Title = "CommandWindow";
    Layout = "~/Views/Shared/_CmdWin.cshtml";
}

<textarea id="cmdText" class="consoleInput">

</textarea>

<script type="text/javascript">
    $(document).ready(function () {
        $('#cmdText').focus();
        $('#cmdText').val('[master]#'); 
    });

    $(document).keydown(function (event) {
        if (event.keyCode == 13) {
            var $text = $('#cmdText').val();
            newCmd($text);
            $('#cmdText').focus();
            ZEUS.DEBUG.log($text.substring($text.lastIndexOf("[master]#") + 9));
        }
    });

    function newCmd(text) {
        $('#cmdText').val(text + '\n[master]#');
    }
</script>

